#ifndef VARARRAY_H
#define VARARRAY_H
#include "./debug.h"
#include "./memory.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct {
  unsigned int maxLength;
  unsigned int length;
  void** data;
} VarArrayStruct;  //变长数组结构

VarArrayStruct* varArray_new(void);
void varArray_del(VarArrayStruct* self);
unsigned int varArray_addData(VarArrayStruct* self, void* data);
void* varArray_delIndex(VarArrayStruct* self, unsigned int i);
unsigned int varArray_findData(VarArrayStruct* self, void* data);

#ifdef __cplusplus
}
#endif
#endif  // VARARRAY_H
